#include <iostream>
#include <string>
#include <map>
#include <algorithm>
using namespace std;


long array[1001];
int n;
map<long, bool> table;
	

void swap(int lo, int hi) {
	int aux = array[lo];
	array[lo] = array[hi];
	array[hi] = aux;
	
}

void sort(int lo0, int hi0) {
	int lo = lo0;
	int hi = hi0;
	int mid;

	if (hi0 > lo0) {

		mid = array[(lo0 + hi0) / 2];

		while (lo <= hi) {
			while ((lo < hi0) && ((array[lo] > mid)))
				++lo;

			while ((hi > lo0) && ((array[hi] < mid)))
				--hi;

			if (lo <= hi) {
				swap(lo, hi);

				++lo;
				--hi;
			}
		}

		if (lo0 < hi)
			sort(lo0, hi);

		if (lo < hi0)
			sort(lo, hi0);

	}
}





void process() {
//cout << "process\n";
	for (int k = 0; k < n; k++) {
		cin >> array[k];
	}

//	for (int k = 0; k < n; k++) {
//		cout << array[k] << "\n";
//	}


	sort(0, n-1);



	for (int d = 0; d < n; d++) {
	
		for (int c = 0; c < n; c++) {
	
			for (int b = c + 1; b < n; b++) {
				
				for (int a = b + 1; a < n; a++) {
			//		cout << array[d] << " " << array[c] << " " << array[b] << " " << array[a] << "\n";			
					if (a != b && a != c && a != d && b != c && b != d && c != d) {
						if (array[a] + array[b] + array[c] == array[d]) {
							cout << array[d] << "\n";
							return;
						}
					}
				}
			}
		}
	}

//	for (int k = 0; k < n; k++) {
//		cout << array[k] << "\n";
//	}

/*	table.clear();
	
	for (int a = 0; a < n; a++) {			
		for (int b = a + 1; b < n; b++) {
			if (array[a] != array[b])	
				table[array[a] + array[b]] = true;
				cout << array[a] << " + " << array[b] << " = " << array[a] + array[b] << "\n";
				
		}
			
	}
		
		
	for (int d = 0; d < n; d++) {
			
		for (int c = d + 1; c < n; c++) {
				cout << array[d] << " - " << array[c] << " = " << array[d] - array[c] << "\n";
				if (array[c] != array[d])
				if (table[array[d] - array[c]]) {
					cout << array[d] << "\n";
					return;
				}
				
				
		}
			
	}*/
	
	cout << "no solution\n";

}


int main() {

	while (true) {

		cin >> n;
		if (n == 0) break;
		process();
	}

}	
